<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">

    <title>Sổ Qũy</title>


    <link rel="stylesheet" type="text/css" href="{$baseUrl}/media/css/jquery.dataTables.css">
    <link rel="stylesheet" type="text/css" href="{$baseUrl}/css/dataTables.tableTools.css">
    <link rel="stylesheet" type="text/css" href="{$baseUrl}/resources/syntax/shCore.css">
    <link rel="stylesheet" type="text/css" href="{$baseUrl}/resources/demo.css">
    <link rel="stylesheet" type="text/css" href="{$baseUrl}/styles/report.css">

    <script type="text/javascript" language="javascript" src="{$baseUrl}/media/js/jquery.js"></script>
    <script type="text/javascript" language="javascript" src="{$baseUrl}/media/js/jquery.dataTables.js"></script>
    <script type="text/javascript" language="javascript" src="{$baseUrl}/js/dataTables.tableTools.js"></script>
    <script type="text/javascript" language="javascript" src="{$baseUrl}/resources/syntax/shCore.js"></script>
    <script type="text/javascript" language="javascript" src="{$baseUrl}/resources/demo.js"></script>

    <script type="text/javascript" language="javascript" class="init">
    {literal}
        $(document).ready(function() {
            $('#example').DataTable( {
                dom: 'T<"clear">lfrtip',
                tableTools: {
                    "sSwfPath": "{$baseUrl}/swf/copy_csv_xls_pdf.swf"
                }
            } );
        } );
    {/literal}
    </script>

    <style type="text/css">
        {literal}
        /* this is an intersting idea for this section */
        .example-print {
            display: none;
        }
        @media print {
            .example-screen {
                display: none;
            }
            .example-print {
                display: block;
            }
        }
        {/literal}
    </style>


</head>

<body class="dt-example">
<br>

<div class="container">
    <section>
        <div>
            <div>
                <b>{$tencty}</b>
                <br>
                <i>{$diachi}</i>
            </div>
            <p>{$tieude}</p>
            <div class="detail">
                <b>Tài khoản: {$loaitk}</b>
                <br>
                Từ ngày: <b>{$tbdau|date_format:"%D"}</b> đến ngày: <b>{$tkthuc|date_format:"%D"}</b>
            </div>

        </div>
        <div class="example-print">
            <div>
                <b>{$tencty}</b>
                <br>
                <i>{$diachi}</i>
            </div>
            <p>{$tieude}</p>
            <div class="detail">
                <b>Tài khoản: {$loaitk}</b>
                <br>
                Từ ngày: <b>{$tbdau|date_format:"%D"}</b> đến ngày: <b>{$tkthuc|date_format:"%D"}</b>
            </div>

        </div>

<table id="example" class="display" cellspacing="0" width="100%">

<thead>
<tr>
    <th  rowspan="2"> NGÀY </th>
    <th  colspan="2"> SỐ PHIẾU </th>
    <th  rowspan="2"> NỘI DUNG </th>
    <th  rowspan="2"> TKĐƯ </th>
    <th  colspan="3"> SỐ TIỀN </th>
</tr>
<tr>
    <th > THU </th>
    <th > CHI </th>
    <th > Nợ </th>
    <th > Có </th>
    <th> Số dư </th>
</tr>

</thead>

<tfoot>
<tr>

</tr>
</tfoot>

<tbody>
{foreach from=$ctkts item=ctkt}
    <tr>
        <td >
            {$ctkt.ngct|date_format:"%D"}
        </td>
        <td>
            {if $ctkt.noco eq 'N'}
                {$ctkt.soct}
            {/if}
        </td>
        <td>
            {if $ctkt.noco eq 'C'}
                {$ctkt.soct}
            {/if}
        </td>
        <td id="noidung">
            {$ctkt.diengiai}
        </td>
        <td>
            {$ctkt.tkdu}
        </td>

        <td id="sotien">
            {if $ctkt.noco eq 'N'}
                {$ctkt.psno|number_format:0:".":"."}

            {/if}
        </td>
        <td id="sotien" >
            {if $ctkt.noco eq 'C'}
                {$ctkt.psno|number_format:0:".":"."}
            {/if}
        </td>
        <td></td>
    </tr>
{/foreach}
<!--
<tr>
    <th> TỔNG CỘNG  </th>
    <th>  </th>
    <th>  </th>
    <th>  </th>
    <th> </th>
    <th> {tcNo} </th>
    <th> {tcCo} </th>
    <th></th>

</tr>
-->
</tbody>
</table>
    <br>
</body>
</html>